package console.window;

import java.io.Reader;
import gnu.mapping.*;
import gnu.text.*;

/**
 * This class connects the Console area to the Kawa scripter.
 */
public class SwingInPort extends TtyInPort {
	SwingMessageArea buffer;
	public SwingInPort (Reader in, Path name, OutPort tie, SwingMessageArea buffer) {
		super (in, name, tie);
		this.buffer = buffer;
	}
	public void lineStart (boolean revisited) throws java.io.IOException {
		super.lineStart(revisited);
		if (! revisited && buffer.outputMark < buffer.endMark) {
			buffer.enter();
		}
	}
}
